<% content_for :main_content do %>
<div class="row">
  <div class="col-lg-12">
      <section class="panel">
          <header class="panel-heading">
            <%= t(".banner") %>
          </header>
          <div class="panel-body">
            <div class="clearfix">
                <div class="btn-group">
                    <span class="btn btn-primary" >
                      <%= link_to fa_icon("plus"), new_merchant_banner_path(portal_style_id: @portal_style.id) %>
                    </span>
                </div>
            </div>
            <div class="space15"></div>

            <table class="table table-striped table-advance table-hover">
              <thead>
              <tr>
                <th><%= t(".cover") %></th>
                <th><%= t(".description") %></th>
                  <th><%= t(".url") %></th>
                  <th colspan="3"></th>
              </tr>
              </thead>
                <tbody>
                <% @banners.each do |banner| %>
                  <tr>
                    <td><%= image_tag banner.cover, size: "64x36" %></td>
                    <td><%= banner.description %></td>
                    <td><%= banner.url %></td>
                    <td><%= link_to t(".show"), [:merchant, banner] %></td>
                    <td><%= link_to t(".edit"), edit_merchant_banner_path(banner) %></td>
                    <td><%= link_to t(".destroy"), [:merchant, banner], method: :delete, data: { confirm: 'Are you sure?' } %></td>
                  </tr>
                <% end %>
              </tbody>
          </table>
          </div>
      </section>
  </div>
</div>
<!-- page end-->
<% end %>

<% content_for :script do %>

<% end %>
